import request from '@/utils/request'
import upload from '@/utils/upload'
import environment from '@/environment'
import storage from "@/utils/storage.js"
import {
	appInfo
} from "@/config.js"

// 添加箱架号
export function createShelfNumber(shelfNo, marksNoSet) {
	const data = {
		containerOwnership: "03",
		containerSpec: "20GP/22G1",
		marksNoSet: marksNoSet,
		packingWay: "01",
		sealNo: "",
		shelfNo: shelfNo,
		transportPackage: "00"
	}
	let currentEnv = storage.get("env") || appInfo.env
	return request({
		'url': `${environment[currentEnv]['scm']}/scm/api/v1/scmLogisticsShelf/create`,
		'method': 'post',
		'data': data
	})
}
// bizUid
export function uploadImg(data) {
	let currentEnv = storage.get("env") || appInfo.env
	return upload({
		'url': `${environment[currentEnv]['common']}/common/api/v1/attachment/upload`,
		'method': 'post',
		'filePath': data.filePath,
		'formData': data.formData,
	})
}